<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>javascript机票的价格</title>
</head>
<body>

<script>

    var p =prompt("请输入月份");
    if (p >= 5 && p <=10){
        console.log("旺季");
        var a =prompt("请选择经济舱还是头等舱");
        if (a == "头等舱"){
            console.log(2000);
        }else {
            console.log(800);
        }
    }else {
        console.log("淡季");
        var b = prompt("请选择经济舱还是头等舱");
        if (b == "头等舱"){
            console.log(800);
        }else {
            console.log(200);
        }
    }


</script>


</body>
</html>